home *** CD-ROM | disk | FTP | other *** search
/ Champak 132 (Alt) / Vol 132.iso / games / nameless.swf / scripts / frame_7 / DoAction.as
Encoding:
Text File  |  2011-06-09  |  913 b   |  49 lines

  1. stop();
  2. _root.level = 3;
  3. _root.stopAllSounds();
  4. _root.music.stop();
  5. music = new Sound();
  6. music.attachSound("level3");
  7. music.start();
  8. music.onSoundComplete = function()
  9. {
  10.    music.start();
  11. };
  12. _root.health = 100;
  13. _root.magic = 100;
  14. pauseMC.removeMovieClip();
  15. _root.createEmptyMovieClip("pauseMC",0);
  16. pview._visible = false;
  17. pauseMC.onEnterFrame = function()
  18. {
  19.    if(Key.isDown(80))
  20.    {
  21.       if(pausePress == false)
  22.       {
  23.          if(_root.pauseMode == false)
  24.          {
  25.             _root.pauseMode = true;
  26.          }
  27.          else
  28.          {
  29.             _root.pauseMode = false;
  30.          }
  31.          pausePress = true;
  32.       }
  33.    }
  34.    else
  35.    {
  36.       pausePress = false;
  37.    }
  38.    if(_root.pauseMode == true)
  39.    {
  40.       pview._visible = true;
  41.       _root.music.setVolume(40);
  42.    }
  43.    else
  44.    {
  45.       pview._visible = false;
  46.       _root.music.setVolume(100);
  47.    }
  48. };
  49.